import request from '@/utils/request'

// 获取供应商部门的人员信息
export function getSupplierListAPI(data) {
	return request({
		headers: { repeatSubmit: false },
		url: '/glm/supplier/deptUserList',
		method: 'POST',
		data
	})
}

// 获取供应商部门树
export function getSupplierTreeAPI() {
	return request({
		headers: { repeatSubmit: false },
		url: '/glm/supplier/tree',
		method: 'POST'
	})
}

// 获取供应商二级账号
export function getSupplierAccountAPI(params) {
	return request({
		headers: { repeatSubmit: false },
		url: '/glm/supplier/generateNumber',
		method: 'post',
		params
	})
}

// 新增二级供应商账号

export function addSupplierAccountAPI(data) {
	return request({
		headers: { repeatSubmit: false },
		url: '/glm/supplier/addSupplier',
		method: 'post',
		data
	})
}

// 新增部门
export function addSupplierDeptAPI(data) {
	return request({
		headers: { repeatSubmit: false },
		url: '/glm/supplier/addDept',
		method: 'post',
		data
	})
}

// 编辑二级供应商
export function editSupplierAPI(data) {
	return request({
		headers: { repeatSubmit: false },
		url: '/glm/supplier/edit',
		method: 'post',
		data
	})
}

// 获取部门信息
export function getDeptInfoAPI(params) {
	return request({
		headers: { repeatSubmit: false },
		url: '/glm/supplier/deptInfo',
		method: 'post',
		params
	})
}

// 编辑部门
export function editDeptAPI(data) {
	return request({
		headers: { repeatSubmit: false },
		url: '/glm/supplier/editDept',
		method: 'post',
		data
	})
}
// 获取供应商信息
export function getUserByUserIdAPI(params) {
	return request({
		url: '/glm/supplier/getUserByUserId',
		method: 'post',
		params
	})
}
